<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>flex</title>
    <style>
        div {
            min-height: 100px;
            min-width: 100px;
            border: 1px solid red;
        }
        .container{
            display:flex;
            flex-direction: row;
            justify-content:flex-start
        }
        .box4{
            
            flex-grow:1;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="box1">1</div>
        <div class="box2">2</div>
        <div class="box3">3</div>
        <div class="box4">4</div>
    </div>
</body>

</html>